Capture
 
 
 Bean Capture
 
Timer capture encapsulation

Typical usage of the bean in user's code.

Typical Usage:

Required bean name is "Cap1".

The following example waits for the first captured value:

 MAIN.C

void main(void)
{

  Cap1_Reset(); /* reset the counter */
  err=1;

  /* wait until captured value is written to variable Data */
  while(err!=ERR_OK);   

}
 EVENTS.C
word Data;
byte err;

void Cap1_OnCapture(void)
{
  /* Write captured value to variable Data */
  err=Cap1_GetCaptureValue(&Data);
}

For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.


Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.